

#ifndef CONFIGHANDLER_H_
#define CONFIGHANDLER_H_

enum SubscriptionManagerType {
	SIENAFF = 0,
	OCM = 1
};


enum StorageType {
	CACHE = 0,
	DATABASE = 1,
	DISK = 2
};

enum IndexingType {
	SIMPLE = 0,
	MEDIUM = 1,
	COMPLEX = 2
};

enum MemoryTableType {
	PRIORITY = 0,
	ALLOCATION = 1,
	EVENT = 2,
	FIFO = 3
};

enum ExecutionFlowType {
	SERIAL = 0,
	PARALLEL = 1
};


class ConfigHandler {

public:

	ConfigHandler();

	virtual ~ConfigHandler();

	void setDefaultConfiguration();
	void setDefaultSienaFF();
	void setDefaultOCM();
	void setDefaultOracle();

	IndexingType getIndexingType() const;
    float getLastThreshold() const;
    ExecutionFlowType getMemManagerExecutionFlow() const;
    MemoryTableType getMemoryTableType() const;
    int getNumInterval() const;
    int getNumProc() const;
    int getNumSlot() const;
    StorageType getStorageType() const;
    int getSubsThreshold() const;

    void setIndexingType(IndexingType indexingType);
    void setLastThreshold(float lastThreshold);
    void setMemManagerExecutionFlow(ExecutionFlowType memManagerExecutionFlow);
    void setMemoryTableType(MemoryTableType memoryTableType);
    void setNumInterval(int numInterval);
    void setNumProc(int numProc);
    void setNumSlot(int numSlot);
    void setStorageType(StorageType storageType);
    void setSubsThreshold(int subsThreshold);
    SubscriptionManagerType getSubManagerType() const;
    void setSubManagerType(SubscriptionManagerType subManagerType);



private:

	//*** Memory parameters ***//
	StorageType storageType;
	IndexingType indexingType;

	//*** MemoryTable parameters ***//
	MemoryTableType memoryTableType;
	int numSlot;

	//*** MemoryManager parameters ***//
	ExecutionFlowType memManagerExecutionFlow;
	int subsThreshold;
	int numInterval;
	float lastThreshold;

	//*** TRexEngine parameters ***//
	int numProc;

	//*** SubscriptionManager parameters ***//
	SubscriptionManagerType subManagerType;

};



#endif /* CONFIGHANDLER_H_ */
